/*
 * @Copyright    : Blueray Med .ltd
 * @file name    : Filename
 * @Date         : 2019-09-15 10:39:01
 * @LastEditor   : Liam
 * @LastDate     : date
 * @Describe     :
 */
#include "sys.h"
#include "uart2.h"
#include "Protocol.h"
#include "btn_scan.h"
#include "myQueue.h"
#include "password.h"

extern u16 time_ms;

void main(void)
{
	sys_init();			//系统初始化
	uart2_init(115200); //初始化串口2
	protocol_init();
	sys_delay_about_ms (1000);
	my_queue_init();
	the_gui_system_init ();
	while (1)
	{
		uart2_run();
		password_handler();
		protocol_thread();
		btn_click_handler_30ms(); //按钮点击事件处理
		btn_click_handler_500();
		btn_click_handler_1000();

		if(time_ms >= 150)
		{
			time_ms = 0;
			my_queue_dequeue();
		}
	}
}
